﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="Donhang_.ascx.cs" Inherits="eDream.Page.Donhang_" %>
<%@ Register Assembly="DevExpress.Web.v12.2, Version=12.2.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" Namespace="DevExpress.Web.ASPxGridView" TagPrefix="dx" %>
<%@ Register Assembly="DevExpress.Web.v12.2, Version=12.2.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" Namespace="DevExpress.Web.ASPxEditors" TagPrefix="dx" %>
<div style="width: 100%; margin-top: 5px; height: 100%; color: #3b3b3b">
    <div class="content_">
        <div class="detail_1">
            <div class="clear"></div>
            <br />
            
            <div style="margin-left: 10px; font-size: 20pt; font-weight: bold">
                Đơn hàng <label id="lb" runat="server"></label>
            </div>
            <div class="clear"></div>
            <div style="margin-top: 20px; margin-left: 10px; margin-right: 10px; width: 100%">
                <dx:ASPxGridView ID="grvDonhang" runat="server" Theme="DevEx"  AutoGenerateColumns="False"  EnableTheming="True" KeyFieldName="IDd" OnLoad="grvDonhang_Load">
                    <Columns>
                        <dx:GridViewDataTextColumn Caption="STT" Name="colRowID" VisibleIndex="0"
                                Width="20px">
                                <DataItemTemplate>
                                    <dx:ASPxLabel ID="lblRowID" runat="server" Text='<%# Container.ItemIndex + 1 %>'>
                                    </dx:ASPxLabel>
                                </DataItemTemplate>
                            </dx:GridViewDataTextColumn>

                        <dx:GridViewDataImageColumn Caption="Hình" FieldName="image" VisibleIndex="2" Width="100px">
                            <DataItemTemplate>
                                <img src='<%# String.Format("http://msmart.vn/Image/product/{0}", Eval("image")) %>' alt='<%#Eval("iProName") %>' width="100" height="100" />
                            </DataItemTemplate>
                        </dx:GridViewDataImageColumn>
                        <dx:GridViewDataTextColumn Caption="Sản phẩm" FieldName="iProName" VisibleIndex="3" Width="170px">
                            <DataItemTemplate>
                                <a href='<%# String.Format("http://msmart.vn/San-pham/{0}/{1}.html", Eval("ProductID"), Utility1.WebUtils.convertToUnSign3(Eval("iProName").ToString())) %>' style="font-weight:bold" ><%#Eval("iProName") %></a>
                            </DataItemTemplate>
                            <CellStyle Wrap="True"></CellStyle>
                        </dx:GridViewDataTextColumn>
                        <dx:GridViewDataTextColumn Caption="Số lượng" FieldName="Soluong" VisibleIndex="4" Width="80px">
                            <CellStyle HorizontalAlign="Center"></CellStyle>
                        </dx:GridViewDataTextColumn>
                        <dx:GridViewDataTextColumn Caption="Đơn giá" FieldName="dongia" VisibleIndex="5" Width="100px">
                            <DataItemTemplate>
                                <%# Utility1.Utils.GetMoneyString(double.Parse(Eval("Gia").ToString())) %> vnđ
                            </DataItemTemplate>
                            <CellStyle HorizontalAlign="Center"></CellStyle>
                        </dx:GridViewDataTextColumn>
                        <dx:GridViewDataTextColumn Name="Thanhtien" Caption="Thành tiền" FieldName="thanhtien" VisibleIndex="6" Width="120px">
                             <DataItemTemplate>
                                <%# Utility1.Utils.GetMoneyString(double.Parse(Eval("tongtien").ToString())) %> vnđ
                            </DataItemTemplate>
                            <CellStyle HorizontalAlign="Center" Wrap="True"></CellStyle>
                            <FooterTemplate>
                                <dx:ASPxLabel ID="lbTong" runat="server" Font-Bold="true" ForeColor="Red" Text=""></dx:ASPxLabel>
                            </FooterTemplate>
                        </dx:GridViewDataTextColumn>
                         <dx:GridViewDataDateColumn Caption="Ngày đặt" FieldName="datePost" VisibleIndex="7" Width="100px">
                             <CellStyle HorizontalAlign="Center"></CellStyle>
                        </dx:GridViewDataDateColumn>
                        <dx:GridViewDataTextColumn Caption="Trạng thái" FieldName="trangthai" VisibleIndex="8" Width="100px">
                        </dx:GridViewDataTextColumn>
                    </Columns>
                    <Settings ShowFilterRow="false" ShowFilterBar="Hidden" ShowFooter="true" />
                    <SettingsBehavior AllowSort="false"  />
                </dx:ASPxGridView>
                
            </div>
            <div style="height:50px; width:100%"></div>
            <div class="clear"></div>
        </div>
    </div>
</div>
